---
import { Protect } from '@clerk/astro/react';
import Layout from '../../layouts/react/Layout.astro';
---

<Layout title='Page is only accessible by members'>
  <div class='w-full flex justify-center flex-col'>
    <Protect
      client:load
      role='org:admin'
    >
      <Fragment slot='fallback'>
        <h1 class='text-2xl text-center'>Not an admin</h1>
        <a
          class='text-sm text-center text-gray-100 transition hover:text-gray-400'
          href='/only-members'
          >Go to Members Page</a
        >
      </Fragment>
      <h1 class='text-2xl text-center'>I'm an admin</h1>
    </Protect>
  </div>
</Layout>
